#namespace("com.htwy.core.model.Dataset")
  #sql("findByCondition")
    SELECT uuid, label, code, statement, serial, creator, createTime, mender, modifyTime, deletedBy, deletedMarker, deleteTime
    FROM ht_sys_dataset
    #WHERE()
      #if(uuid)
        uuid = #para(uuid)
      #end
      #if(label)
        AND label = #para(label)
      #end
      #if(code)
        AND code = #para(code)
      #end
      #if(statement)
        AND statement = #para(statement)
      #end
      #if(serial)
        AND serial = #para(serial)
      #end
      #if(creator)
        AND creator = #para(creator)
      #end
      #if(createTime)
        AND createTime = #para(createTime)
      #end
      #if(mender)
        AND mender = #para(mender)
      #end
      #if(modifyTime)
        AND modifyTime = #para(modifyTime)
      #end
      #if(deletedBy)
        AND deletedBy = #para(deletedBy)
      #end
      #if(deletedMarker)
        AND deletedMarker = #para(deletedMarker)
      #end
      #if(deleteTime)
        AND deleteTime = #para(deleteTime)
      #end
    #end
    ORDER BY serial asc
    
  #end

  #sql("deleteByPks")
    DELETE FROM ht_sys_dataset
    #WHERE()
      #if(pks != null && pks.length > 0)
        #if(pks.length>1)
          uuid in (
          #for(tempId : pks)
            #if(for.first)
              #para(tempId)
            #else
              , #para(tempId)
            #end
          #end
          )
        #else
          uuid = #para(pks[0])
        #end
      #end
    #end
  #end
#end